package defpackage; import com.mopub.nativeads.MoPubNativeAdPositioning; import java.io.IOException; import java.io.PrintStream; /* renamed from: aada reason: default package */ public final class aada implements aacz { static int BSK; static final long[] BSM = {0, 0, -1, -1}; static final int[] BSN = new int[0]; public static final String[] BSO = {"", "\r", "\n", "/", ";", "=", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null}; public static final String[] BSP = {"DEFAULT", "INCOMMENT", "NESTED_COMMENT", "INQUOTEDSTRING"}; public static final int[] BSQ = {-1, -1, -1, -1, -1, -1, -1, 1, 0, -1, 2, -1, -1, -1, -1, -1, 3, -1, -1, 0, -1, -1, -1, -1}; static final long[] BSR = {3670079}; static final long[] BSS = {320}; static final long[] BST = {64}; static final long[] BSU = {523904}; public PrintStream BSL; private final int[] BSW; private final int[] BSX; StringBuffer BSY; int BSZ; protected aadc BTG; int BTa; protected char BTb; int BTc; int BTd; int BTe; int BTf; int BTg; int BTh; public aada(aadc aadc) { this.BSL = System.out; this.BSW = new int[3]; this.BSX = new int[6]; this.BTc = 0; this.BTd = 0; this.BTG = aadc; } public aada(aadc aadc, int i) { this(aadc); axq(i); } private final void axp(int i) { if (this.BSW[i] != this.BTf) { int[] iArr = this.BSX; int i2 = this.BTe; this.BTe = i2 + 1; iArr[i2] = i; this.BSW[i] = this.BTf; } } private void axq(int i) { if (i >= 4 || i < 0) { throw new aade("Error: Ignoring invalid lexical state : " + i + ". State unchanged.", 2); } this.BTc = i; } private final int cp(int i, int i2, int i3) { this.BTh = i2; this.BTg = 0; try { this.BTb = this.BTG.readChar(); return nv(2, 1); } catch (IOException e) { return 1; } } private final void gUB() { this.BTf = -2147483647; int i = 3; while (true) { int i2 = i - 1; if (i > 0) { this.BSW[i2] = Integer.MIN_VALUE; i = i2; } else { return; } } } private aadd gUJ() { int i = this.BTh; aadd aadd = new aadd(); aadd.BTv = this.BTh; String str = BSO[this.BTh]; if (str == null) { str = this.BTG.gUI(); } aadd.image = str; aadd.BTw = this.BTG.gUH(); aadd.BTx = this.BTG.gUG(); aadd.BTy = this.BTG.gUF(); aadd.BTz = this.BTG.gUE(); return aadd; } private final int nu(int i, int i2) { this.BTh = i2; this.BTg = 0; return 1; } private final int nv(int i, int i2) { int i3 = 0; this.BTe = 3; int i4 = 1; this.BSX[0] = i; int i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; while (true) { int i6 = this.BTf + 1; this.BTf = i6; if (i6 == Integer.MAX_VALUE) { gUB(); } if (this.BTb < '@') { long j = 1 << this.BTb; do { i4--; switch (this.BSX[i4]) { case 0: if ((4294967808L & j) != 0) { i5 = 6; axp(0); continue; } else { continue; } case 1: if ((287948901175001088L & j) == 0) { continue; } else { if (i5 > 20) { i5 = 20; } axp(1); continue; } case 2: if ((288068726467591679L & j) == 0) { continue; } else { if (i5 > 21) { i5 = 21; } axp(2); continue; } case 3: if ((288068726467591679L & j) != 0) { if (i5 > 21) { i5 = 21; } axp(2); } else if ((4294967808L & j) != 0) { if (i5 > 6) { i5 = 6; } axp(0); } if ((287948901175001088L & j) == 0) { continue; } else { if (i5 > 20) { i5 = 20; } axp(1); continue; } } } while (i4 != i3); } else if (this.BTb < 128) { long j2 = 1 << (this.BTb & '?'); do { i4--; switch (this.BSX[i4]) { case 2: case 3: if ((-939524098 & j2) != 0) { i5 = 21; axp(2); continue; } else { continue; } } } while (i4 != i3); } else { int i7 = (this.BTb & 255) >> 6; long j3 = 1 << (this.BTb & '?'); do { i4--; switch (this.BSX[i4]) { case 2: case 3: if ((BSM[i7] & j3) == 0) { continue; } else { if (i5 > 21) { i5 = 21; } axp(2); continue; } } } while (i4 != i3); } if (i5 != Integer.MAX_VALUE) { this.BTh = i5; this.BTg = i2; i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; } i2++; i4 = this.BTe; this.BTe = i3; i3 = 3 - i3; if (i4 != i3) { try { this.BTb = this.BTG.readChar(); } catch (IOException e) { } } return i2; } } private final int nw(int i, int i2) { int i3 = 0; this.BTe = 3; int i4 = 1; this.BSX[0] = 0; int i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; while (true) { int i6 = this.BTf + 1; this.BTf = i6; if (i6 == Integer.MAX_VALUE) { gUB(); } if (this.BTb < '@') { do { i4--; switch (this.BSX[i4]) { case 0: if (i5 > 11) { i5 = 11; continue; } else { continue; } case 1: if (i5 > 9) { i5 = 9; continue; } else { continue; } } } while (i4 != i3); } else if (this.BTb < 128) { do { i4--; switch (this.BSX[i4]) { case 0: if (i5 > 11) { i5 = 11; } if (this.BTb == '\\') { int[] iArr = this.BSX; int i7 = this.BTe; this.BTe = i7 + 1; iArr[i7] = 1; continue; } else { continue; } case 1: if (i5 > 9) { i5 = 9; continue; } else { continue; } case 2: if (i5 > 11) { i5 = 11; continue; } else { continue; } } } while (i4 != i3); } else { int i8 = (this.BTb & 255) >> 6; long j = 1 << (this.BTb & '?'); do { i4--; switch (this.BSX[i4]) { case 0: if ((BSM[i8] & j) != 0 && i5 > 11) { i5 = 11; continue; } case 1: if ((BSM[i8] & j) != 0 && i5 > 9) { i5 = 9; continue; } } } while (i4 != i3); } if (i5 != Integer.MAX_VALUE) { this.BTh = i5; this.BTg = i2; i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; } i2++; i4 = this.BTe; this.BTe = i3; i3 = 3 - i3; if (i4 != i3) { try { this.BTb = this.BTG.readChar(); } catch (IOException e) { } } return i2; } } private final int nx(int i, int i2) { int i3 = 0; this.BTe = 3; int i4 = 1; this.BSX[0] = 0; int i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; while (true) { int i6 = this.BTf + 1; this.BTf = i6; if (i6 == Integer.MAX_VALUE) { gUB(); } if (this.BTb < '@') { long j = 1 << this.BTb; do { i4--; switch (this.BSX[i4]) { case 0: case 2: if ((-17179869185L & j) == 0) { continue; } else { if (i5 > 18) { i5 = 18; } axp(2); continue; } case 1: if (i5 > 17) { i5 = 17; continue; } else { continue; } } } while (i4 != i3); } else if (this.BTb < 128) { long j2 = 1 << (this.BTb & '?'); do { i4--; switch (this.BSX[i4]) { case 0: if ((-268435457 & j2) != 0) { if (i5 > 18) { i5 = 18; } axp(2); continue; } else if (this.BTb == '\\') { int[] iArr = this.BSX; int i7 = this.BTe; this.BTe = i7 + 1; iArr[i7] = 1; continue; } else { continue; } case 1: if (i5 > 17) { i5 = 17; continue; } else { continue; } case 2: if ((-268435457 & j2) == 0) { continue; } else { if (i5 > 18) { i5 = 18; } axp(2); continue; } } } while (i4 != i3); } else { int i8 = (this.BTb & 255) >> 6; long j3 = 1 << (this.BTb & '?'); do { i4--; switch (this.BSX[i4]) { case 0: case 2: if ((BSM[i8] & j3) == 0) { continue; } else { if (i5 > 18) { i5 = 18; } axp(2); continue; } case 1: if ((BSM[i8] & j3) != 0 && i5 > 17) { i5 = 17; continue; } } } while (i4 != i3); } if (i5 != Integer.MAX_VALUE) { this.BTh = i5; this.BTg = i2; i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; } i2++; i4 = this.BTe; this.BTe = i3; i3 = 3 - i3; if (i4 != i3) { try { this.BTb = this.BTG.readChar(); } catch (IOException e) { } } return i2; } } private final int ny(int i, int i2) { int i3 = 0; this.BTe = 3; int i4 = 1; this.BSX[0] = 0; int i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; while (true) { int i6 = this.BTf + 1; this.BTf = i6; if (i6 == Integer.MAX_VALUE) { gUB(); } if (this.BTb < '@') { do { i4--; switch (this.BSX[i4]) { case 0: if (i5 > 15) { i5 = 15; continue; } else { continue; } case 1: if (i5 > 12) { i5 = 12; continue; } else { continue; } } } while (i4 != i3); } else if (this.BTb < 128) { do { i4--; switch (this.BSX[i4]) { case 0: if (i5 > 15) { i5 = 15; } if (this.BTb == '\\') { int[] iArr = this.BSX; int i7 = this.BTe; this.BTe = i7 + 1; iArr[i7] = 1; continue; } else { continue; } case 1: if (i5 > 12) { i5 = 12; continue; } else { continue; } case 2: if (i5 > 15) { i5 = 15; continue; } else { continue; } } } while (i4 != i3); } else { int i8 = (this.BTb & 255) >> 6; long j = 1 << (this.BTb & '?'); do { i4--; switch (this.BSX[i4]) { case 0: if ((BSM[i8] & j) != 0 && i5 > 15) { i5 = 15; continue; } case 1: if ((BSM[i8] & j) != 0 && i5 > 12) { i5 = 12; continue; } } } while (i4 != i3); } if (i5 != Integer.MAX_VALUE) { this.BTh = i5; this.BTg = i2; i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; } i2++; i4 = this.BTe; this.BTe = i3; i3 = 3 - i3; if (i4 != i3) { try { this.BTb = this.BTG.readChar(); } catch (IOException e) { } } return i2; } } public final aadd gUK() { int nu; int i; int nu2; int nu3; int nu4; boolean z; String str; aadd aadd; aadd aadd2 = null; int i2 = 0; while (true) { try { aadc aadc = this.BTG; aadc.BTm = -1; char readChar = aadc.readChar(); aadc.BTm = aadc.BTn; this.BTb = readChar; this.BSY = null; this.BSZ = 0; while (true) { switch (this.BTc) { case 0: this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; this.BTg = 0; switch (this.BTb) { case '\n': nu4 = cp(0, 2, 2); break; case '\r': nu4 = cp(0, 1, 2); break; case '\"': nu4 = nu(0, 16); break; case '(': nu4 = nu(0, 7); break; case '/': nu4 = nu(0, 3); break; case ';': nu4 = nu(0, 4); break; case '=': nu4 = nu(0, 5); break; default: nu4 = nv(3, 0); break; } i = nu4; break; case 1: this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; this.BTg = 0; switch (this.BTb) { case '(': nu3 = nu(0, 10); break; case ')': nu3 = nu(0, 8); break; default: nu3 = nw(0, 0); break; } i = nu3; break; case 2: this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; this.BTg = 0; switch (this.BTb) { case '(': nu2 = nu(0, 13); break; case ')': nu2 = nu(0, 14); break; default: nu2 = ny(0, 0); break; } i = nu2; break; case 3: this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; this.BTg = 0; switch (this.BTb) { case '\"': nu = nu(0, 19); break; default: nu = nx(0, 0); break; } i = nu; break; default: i = i2; break; } if (this.BTh != Integer.MAX_VALUE) { if (this.BTg + 1 < i) { this.BTG.axr((i - this.BTg) - 1); } if ((BSR[this.BTh >> 6] & (1 << (this.BTh & 63))) != 0) { aadd gUJ = gUJ(); gUJ.BTJ = aadd2; switch (this.BTh) { case 19: if (this.BSY == null) { this.BSY = new StringBuffer(); } StringBuffer stringBuffer = this.BSY; aadc aadc2 = this.BTG; int i3 = this.BSZ; int i4 = this.BTg + 1; this.BTa = i4; stringBuffer.append(aadc2.axs(i3 + i4)); gUJ.image = this.BSY.substring(0, this.BSY.length() - 1); break; } if (BSQ[this.BTh] == -1) { return gUJ; } this.BTc = BSQ[this.BTh]; return gUJ; } else if ((BSS[this.BTh >> 6] & (1 << (this.BTh & 63))) != 0) { if ((BST[this.BTh >> 6] & (1 << (this.BTh & 63))) != 0) { aadd = gUJ(); if (aadd2 != null) { aadd.BTJ = aadd2; aadd2.BTI = aadd; } } else { aadd = aadd2; } if (BSQ[this.BTh] != -1) { this.BTc = BSQ[this.BTh]; aadd2 = aadd; i2 = i; } else { aadd2 = aadd; i2 = i; } } else { int i5 = this.BSZ; int i6 = this.BTg + 1; this.BTa = i6; this.BSZ = i5 + i6; switch (this.BTh) { case 9: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BTG.axs(this.BSZ)); this.BSZ = 0; this.BSY.deleteCharAt(this.BSY.length() - 2); break; case 10: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BTG.axs(this.BSZ)); this.BSZ = 0; BSK = 1; break; case 12: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BTG.axs(this.BSZ)); this.BSZ = 0; this.BSY.deleteCharAt(this.BSY.length() - 2); break; case 13: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BTG.axs(this.BSZ)); this.BSZ = 0; BSK++; break; case 14: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BTG.axs(this.BSZ)); this.BSZ = 0; int i7 = BSK - 1; BSK = i7; if (i7 == 0) { axq(1); break; } break; case 16: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BTG.axs(this.BSZ)); this.BSZ = 0; this.BSY.deleteCharAt(this.BSY.length() - 1); break; case 17: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BTG.axs(this.BSZ)); this.BSZ = 0; this.BSY.deleteCharAt(this.BSY.length() - 2); break; } if (BSQ[this.BTh] != -1) { this.BTc = BSQ[this.BTh]; } this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; try { this.BTb = this.BTG.readChar(); i2 = 0; } catch (IOException e) { i = 0; } } } } } catch (IOException e2) { this.BTh = 0; aadd gUJ2 = gUJ(); gUJ2.BTJ = aadd2; return gUJ2; } } int gUF = this.BTG.gUF(); int gUE = this.BTG.gUE(); try { this.BTG.readChar(); this.BTG.axr(1); z = false; str = null; } catch (IOException e3) { String gUI = i <= 1 ? "" : this.BTG.gUI(); if (this.BTb == '\n' || this.BTb == '\r') { gUF++; z = true; str = gUI; gUE = 0; } else { gUE++; z = true; str = gUI; } } if (!z) { this.BTG.axr(1); str = i <= 1 ? "" : this.BTG.gUI(); } throw new aade(z, this.BTc, gUF, gUE, str, this.BTb, 0); } }